package com.example.demo6.ui.edit;

import static java.security.AccessController.getContext;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

import com.example.demo6.SQLite.LostGoods;
import com.example.demo6.SQLite.MyDatabase;

public class EditMylostfragmentViewModel extends ViewModel {
    // TODO: Implement the ViewModel
//    private MutableLiveData<LostGoods> lostGoodsLiveData = new MutableLiveData<>();
//
//    public LiveData<LostGoods> getLostGoods(int goodsId) {
//        // 在这里调用数据库并设置LiveData
//        MyDatabase.getInstance(getContext()).lostGoodsDao().getMyLostGoodsByGoodsId(goodsId).observeForever(lostGoods -> {
//            lostGoodsLiveData.setValue(lostGoods);
//        });
//
//        return lostGoodsLiveData;
//    }
}